package com.ruoyi.project.student.service.impl;

import java.util.List;

import com.ruoyi.project.student.domain.StudentVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.student.mapper.StudentMapper;
import com.ruoyi.project.student.domain.Student;
import com.ruoyi.project.student.service.IStudentService;

/**
 * 学生管理系统Service业务层处理
 * 
 * @author ning
 * @date 2025-03-20
 */
@Service
public class StudentServiceImpl implements IStudentService 
{
    @Autowired
    private StudentMapper studentMapper;

    /**
     * 查询学生列表
     * 
     * @param studentvo 学生
     * @return 学生管理系统
     */
    @Override
    public List<StudentVo> selectStudentList(StudentVo studentvo)
    {
        return studentMapper.selectStudentList(studentvo);
    }

    /**
     * 新增学生
     * 
     * @param studentvo 学生
     * @return 结果
     */
    @Override
    public int insertStudent(StudentVo studentvo)
    {
        return studentMapper.insertStudent(studentvo);
    }

    /**
     * 新增学生
     *
     * @param student 学生
     * @return 结果
     */
    @Override
    public int deleteStudent(Student student) {
        return studentMapper.deleteStudentById(student.getId());
    }

    /**
     * 新增学生
     *
     * @param student 学生
     * @return 结果
     */
    @Override
    public int editStudent(Student student) {
        return studentMapper.updateStudent(student);
    }

}
